import VueRouter from "vue-router"



import HomeContainer from "./components/tabbars/HomeContainer.vue"
import MemberContainer from "./components/tabbars/MemberContainer.vue"
import SearchContainer from "./components/tabbars/SearchContainer.vue"
import ShopCartContainer from "./components/tabbars/ShopCartContainer.vue"
import NewsList from "./components/news/newsList.vue"
import NewsInfo from "./components/news/newsInfo.vue"
import photoList from "./components/photos/PhotoList.vue"

console.log(ShopCartContainer);
// 路由对象
const router = new VueRouter({
    routes:[

        {path:"/",redirect:"/home"},//如果是根路径默认转到主页
        {path:"/home",component:HomeContainer},
        {path:"/member",component:MemberContainer},
        {path:"/search",component:SearchContainer},
        {path:"/shop",component:ShopCartContainer},
        {path:"/home/newsList",component:NewsList},
        {path:"/home/newsinfo/:id",component:NewsInfo,props:true},//启动props来就收路由的参数
        {path:"/home/photolist",component:photoList},//启动props来就收路由的参数
        

    ],
    linkActiveClass:"mui-active"

})

export default router